<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>循环轮播</title>
  <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/Swiper/10.2.0/swiper-bundle.min.css">
  <script src="https://cdn.bootcdn.net/ajax/libs/Swiper/10.2.0/swiper-bundle.min.js"></script>
  <style>
    .swiper {
      width: 400px;
      height: 80px;
      border: 1px solid red;
    }

    .swiper .swiper-wrapper {
      -webkit-transition-timing-function: linear;
      transition-timing-function: linear;
    }

    .swiper .swiper-slide {
      display: flex;
      justify-content: center;
    }

    .swiper .swiper-slide>div {
      width: 80px;
      line-height: 80px;
      text-align: center;
      background-color: yellow;
      font-size: 24px;
    }
  </style>
</head>

<body>
  <div class="swiper">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <div>1</div>
      </div>
      <div class="swiper-slide">
        <div>2</div>
      </div>
      <div class="swiper-slide">
        <div>3</div>
      </div>
      <div class="swiper-slide">
        <div>4</div>
      </div>
      <div class="swiper-slide">
        <div>5</div>
      </div>
      <div class="swiper-slide">
        <div>6</div>
      </div>
    </div>
  </div>
</body>

<script type="text/javascript">
  var mySwiper = new Swiper('.swiper', {
    slidesPerView: 3,
    speed: 2000,
    loop: true,
    enabled: false,
    autoplay: {
      delay: 0,
      stopOnLastSlide: false,
      disableOnInteraction: false,
    }
  });
  mySwiper.allowTouchMove = false;
  setTimeout(() => {
    mySwiper.enable();
    mySwiper.autoplay.start();
  }, 1000);
</script>

</html>